DXL Scripting : How to add the linkage between one module and the another ?

Hi All,

I am a newbie. Can you please help me to script how to add the linakge between one module to the other?

Thanks & Regards,
Shriraam
SystemAdmin - Fri Feb 08 02:26:52 EST 2013

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Fri Feb 08 06:13:56 EST 2013

It can be done in two steps:

1.) You can just drag the requirement from the current module to the requirement you want to link in other module by opening together.

2.) You can right click on the requirement in a particular module and selct the option make start.
Go to the module which you want to link, right click and select make link from start.

Aslo,You can have a glance in the DOORS reference manual in the help tab.

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Sat Feb 09 08:30:19 EST 2013

There is 3 such scripts on your computer:
link by attribute
linkbykey.dxl
linkbypair.dxl

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Wed Feb 13 01:44:25 EST 2013

SystemAdmin - Sat Feb 09 08:30:19 EST 2013
There is 3 such scripts on your computer:
link by attribute
linkbykey.dxl
linkbypair.dxl

Hi,

Thanks a lot for your help.Can you please let me know how retrieve these scripts?

Thanks & Regards,
Shriraam

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Thu Feb 14 00:17:10 EST 2013

Do you want to create one link or many links at a time?

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Thu Feb 14 01:53:40 EST 2013

SystemAdmin - Thu Feb 14 00:17:10 EST 2013
Do you want to create one link or many links at a time?

Hi,

Thanks. I just need to create a link between one module to the other.

Regards,
Shriraam

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Thu Feb 14 03:52:50 EST 2013

SystemAdmin - Thu Feb 14 01:53:40 EST 2013
Hi,

Thanks. I just need to create a link between one module to the other.

Regards,
Shriraam

Below script will create a link from one module to another

Module m=current // m is a source module from where link is started
Object o_source=object(3) // value 3 is a absolute number(ID) of object present in m(source) module
Item it=item("here mention path of target module")
Module m1=module(it)
Object o_target=object(8,m1) // value 8 is a ID of object present in m1(target) module
o_source -> "mention here path of link module" -> o_target

string source=identifier(o_source)
string target=identifier(o_target)

print source "\n"target

Above script will create link between two objects of two different modules. Mention the ID's of objects properly without prefix.

Regards,
Hemlata

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Thu Feb 14 04:36:11 EST 2013

SystemAdmin - Thu Feb 14 03:52:50 EST 2013
Below script will create a link from one module to another

Module m=current // m is a source module from where link is started
Object o_source=object(3) // value 3 is a absolute number(ID) of object present in m(source) module
Item it=item("here mention path of target module")
Module m1=module(it)
Object o_target=object(8,m1) // value 8 is a ID of object present in m1(target) module
o_source -> "mention here path of link module" -> o_target

string source=identifier(o_source)
string target=identifier(o_target)

print source "\n"target

Above script will create link between two objects of two different modules. Mention the ID's of objects properly without prefix.

Regards,
Hemlata

Thanks a lot Hemlata.It worked.

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Thu Feb 14 04:52:32 EST 2013

SystemAdmin - Thu Feb 14 03:52:50 EST 2013
Below script will create a link from one module to another

Module m=current // m is a source module from where link is started
Object o_source=object(3) // value 3 is a absolute number(ID) of object present in m(source) module
Item it=item("here mention path of target module")
Module m1=module(it)
Object o_target=object(8,m1) // value 8 is a ID of object present in m1(target) module
o_source -> "mention here path of link module" -> o_target

string source=identifier(o_source)
string target=identifier(o_target)

print source "\n"target

Above script will create link between two objects of two different modules. Mention the ID's of objects properly without prefix.

Regards,
Hemlata

Hello,

I just now tried it. I am little bit puzzled what should be the path for "Link path" in code.

Module m=current // m is a source module from where link is started
Object o_source=object(3) // value 3 is a absolute number(ID) of object present in m(source) module
Item it=item("/DAG_Sandbox/Test_CRS/Test_FL_HU222_High_Telephone")
Module m1=module(it)
Object o_target=object(8,m1) // value 8 is a ID of object present in m1(target) module
o_source -> "/DAG_Sandbox/Test_CRS/Test_FL_HU222_High_Telephone/" -> o_target

string source=identifier(o_source)
string target=identifier(o_target)

print source "\n"target

It is throwing an error for me.Please help me what i should give in the path.

Thanks,
Shriraam

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Thu Feb 14 05:02:05 EST 2013

Please help me out what should be mentioned in the Link path.

Re: DXL Scripting : How to add the linkage between one module and the another ?
SystemAdmin - Thu Feb 14 05:14:11 EST 2013

SystemAdmin - Thu Feb 14 04:52:32 EST 2013
Hello,

I just now tried it. I am little bit puzzled what should be the path for "Link path" in code.

Module m=current // m is a source module from where link is started
Object o_source=object(3) // value 3 is a absolute number(ID) of object present in m(source) module
Item it=item("/DAG_Sandbox/Test_CRS/Test_FL_HU222_High_Telephone")
Module m1=module(it)
Object o_target=object(8,m1) // value 8 is a ID of object present in m1(target) module
o_source -> "/DAG_Sandbox/Test_CRS/Test_FL_HU222_High_Telephone/" -> o_target

string source=identifier(o_source)
string target=identifier(o_target)

print source "\n"target

It is throwing an error for me.Please help me what i should give in the path.

Thanks,
Shriraam

At the time of creating links you need to give linkmodule name

o_source -> "path of linkmodule" -> o_target

when we create links default linkmodule is created in DOORS namely "DOORS links". You can give same default linkmodule name or create another linkmodule and give that path. linkmodule contains linksets.Default linkmodule is automatically created by DOORS in the folder where your module is present. But you can create in different folder also and give path of that linkmodule in above line.
please refer DOORS reference manual for linkmodule. it will be more helpfull to you inorder to create linkmodule

Regards,
Hemlata

Re: DXL Scripting : How to add the linkage between one module and the another ?
Thuhin - Fri Jan 17 04:49:50 EST 2014

SystemAdmin - Thu Feb 14 05:14:11 EST 2013
At the time of creating links you need to give linkmodule name

o_source -> "path of linkmodule" -> o_target

when we create links default linkmodule is created in DOORS namely "DOORS links". You can give same default linkmodule name or create another linkmodule and give that path. linkmodule contains linksets.Default linkmodule is automatically created by DOORS in the folder where your module is present. But you can create in different folder also and give path of that linkmodule in above line.
please refer DOORS reference manual for linkmodule. it will be more helpfull to you inorder to create linkmodule

Regards,
Hemlata

How to write a DXL script to add 20000 objects in a DOORS Module?

Please advice!!

Thanks in advance!

Re: DXL Scripting : How to add the linkage between one module and the another ?
GregM_dxler - Fri Jan 17 09:17:25 EST 2014

Thuhin - Fri Jan 17 04:49:50 EST 2014

How to write a DXL script to add 20000 objects in a DOORS Module?

Please advice!!

Thanks in advance!

Thuhin,

You should probably start a new thread, as this request is much different than the existing thread subject.

To add a bunch of objects, I would use a loop

int iCnt, iTotal=20000

Object oCur=current

Object o

for (iCnt=0; iCnt<iTotal; iCnt++) {

   o =create(after oCur)

   oCur = o

}

This will add the number of objects at the same level as the current one.  Note they will look like headers since there is no text in them.

Hope this helps,

Greg